<?php

/**
 * Class Involved_CompanyModel
 */

class Involved_CompanyModel extends BaseModel
{
    protected $table = 'company';

        public function CompanyList($company)
        {
         return   DB::table($this->table)
                ->whereIn('company_name',$company)
                ->get();
        }

    public function TopEnterYpt()
    {
        return   DB::table($this->table)
            ->select('company_id','company_name','created')
            ->where('type',1)
            ->paginate(5);
    }

    public function TopEnterSst(){
        return   DB::table($this->table)
            ->select('company_id','company_name','created')
            ->where('type',2)
            ->paginate(5);
    }

    public function TopEnterArticle($company_id)
    {
        return   DB::table($this->table)
            ->select('company_id','company_name','created','brief')
            ->where('company_id',$company_id)
            ->first();
    }
}